package sg.edu.nus.iss.team4.entity;

import java.util.ArrayList;
import java.util.List;

public class Researcher {
	private Integer id;
	private String name;
	private String password;
	private String email;
	private String company;
	
	private List<Questionnaire> questionnaires = new ArrayList<Questionnaire>();
	
	public Researcher() {}

	public Researcher(String name, String email, String password, String company) {
		this.name = name;
		this.password = password;
		this.email = email;
		this.company = company;
	}
	
	public List<Questionnaire> getQuestionnaires() {
		return questionnaires;
	}
	public void setQuestionnaires(List<Questionnaire> questionnaires) {
		this.questionnaires = questionnaires;
	}
	
	public void addQuestionnaire(Questionnaire questionnaire) {
		if (!questionnaires.contains(questionnaire)) {
			questionnaires.add(questionnaire);
		}
	}
	
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	
	public String toString() {
		return "ID = " + id + ", Name = " + name;
	}
}
